﻿using System;
using System . Collections . Generic;
using System . Linq;
using System . Text;
using System . Threading . Tasks;
using System . Xml . Linq;

namespace WenceyWang . RichMan4L . Buffs
{
	/// <summary>
	/// 指示绑定到玩家的效果(神灵)
	/// </summary>
	public abstract class PlayerBuff : Buff
	{
		public Players . Player Target { get; private set; }

		public virtual bool BlockBuyStock { get; } = false;

		public virtual bool BlockSellStock { get; } = false;

		public virtual bool BlockBuyArea { get; } = false;

		public virtual bool BlockBuildBuilding { get; } = false;

		public virtual bool BlockBuildingWorking { get; } = false;

		public virtual bool BlockGetCharge { get; } = false;

		public virtual bool BlockMoving { get; } = false;

		public virtual bool FreeOfCharge { get; } = false;

		public virtual int AddDice { get; } = 0;

		public virtual bool ControlDice { get; } = false;

		public virtual bool ValueOfDice { get; }

		public virtual bool UpgradeBuildngs { get; } = false;

		

		public virtual bool BadLuck { get; } = false;

		public virtual bool GoodLuck { get; } = false;

		//public virtual bool 

		public PlayerBuff ( Players . Player target )
		{
			Target = target;

			StartDate = Game . Current . Calendar . Today;
		}

		public override void StartDay ( Calendars . GameDate nextDate )
		{
			if ( Game . Current . Calendar . Today == StartDate + Duration )
			{
				Target . Buffs . Remove ( this );
			}
			base . StartDay ( nextDate );
		}
	}
}
